import React, { Component } from 'react'
import styles from './MusicItem.module.css'
export default class MusicItem extends Component {
    // constructor(props){
    //     super(props)
    // }
    render() {
        
        return (
            <div className={styles.item} onClick={this.handleClick.bind(this,this.props.data.name)}>
                <img className={styles.pic} src={this.props.data.coverImgUrl} alt=""></img>
                <div className={styles.name}>{this.props.data.name}</div>
            </div>
        )
    }  
    handleClick(name){
       alert(name)
    }
}
